import axios from "@/utils/axios";

export default {
    // 根据幼儿园 ID 获取班级列表
    getGroupsIdNameBySchoolId(schoolId) {
        return axios.get('/groups/getGroupsIdNameBySchoolId/' + schoolId);
    },
    // 根据班级 ID 获取班级信息
    getGroupByGroupId(groupId) {
        return axios.get('/groups/getGroupByGroupId', {
            params: {
                groupId: groupId
            }
        });
    },
    // 创建班级
    createGroup(group) {
        return axios.post('/groups', group);
    },
    // 更新班级信息
    updateGroup(group) {
        return axios.put('/groups', group);
    },
    // 删除班级
    deleteGroup(groupId) {
        return axios.delete('/groups/' + groupId);
    },
    // 获取年龄段
    getAllGroupStage() {
        return axios.get('/groups/stages');
    },
}
